package com.iwithlong.weixincustomhandler;

import org.apache.commons.lang3.StringUtils;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by xiexiaohan on 2018/2/1.
 */
public class TextWeixinCustomHandler implements WeixinCustomHandler {
    private String[] weixinPublicStrs = new String[]{"微信公众号","公众号","微信"};
    @Override
    public Map<String, Object> dealWithJsonRequest(Map<String,Object> map) {
//        Long sessionFrom = Long.valueOf(String.valueOf(map.get("SessionFrom")));
//
//        Map<String,Object> result = new HashMap<>();
//        result.put("touser",map.get("FromUserName"));
//        String content = String.valueOf(map.get("Content"));
//        if(StringUtils.containsAny(content,weixinPublicStrs)){
//
//        }else {
//            Map<String,String> textMap = new HashMap<>();
//            textMap.put("content","回复 公众号：进入公众号");
//            result.put("msgtype","text");
//            result.put("text","");
//        }
//
        return null;
    }
}
